// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 获取设备-定期检修记录数据 POST /equRepairRegularRecord/get */
export async function equRepairRegularRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquRepairRegularRecordEntity>;

export async function equRepairRegularRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquRepairRegularRecordEntity>>;

export async function equRepairRegularRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquRepairRegularRecordEntity>;

export async function equRepairRegularRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquRepairRegularRecordEntity>(
      `/app/equRepairRegularRecord/get`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultEquRepairRegularRecordEntity>(
    `/app/equRepairRegularRecord/get`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 处理 POST /equRepairRegularRecord/handle */
export async function equRepairRegularRecordHandle(
  body: BIZAPI.EquRepairRegularRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularRecordHandle(
  body: BIZAPI.EquRepairRegularRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equRepairRegularRecordHandle(
  body: BIZAPI.EquRepairRegularRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equRepairRegularRecordHandle(
  body: BIZAPI.EquRepairRegularRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equRepairRegularRecord/handle`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equRepairRegularRecord/handle`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取设备-定期检修记录分页数据 POST /equRepairRegularRecord/page */
export async function equRepairRegularRecordPage(
  body: BIZAPI.EquRepairRegularRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquRepairRegularRecordEntity>;

export async function equRepairRegularRecordPage(
  body: BIZAPI.EquRepairRegularRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquRepairRegularRecordEntity>>;

export async function equRepairRegularRecordPage(
  body: BIZAPI.EquRepairRegularRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquRepairRegularRecordEntity>;

export async function equRepairRegularRecordPage(
  body: BIZAPI.EquRepairRegularRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquRepairRegularRecordEntity>(
      `/app/equRepairRegularRecord/page`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        data: body,
        ...(options || {}),
        tupleResponse: true,
      }
    );
  }

  return api<BIZAPI.IResultIPageEquRepairRegularRecordEntity>(
    `/app/equRepairRegularRecord/page`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}
